Query Application

Query Application v1.05 - MODEMS

Send - Send AT command to your modem.
Hide - Hide Query Application window (Enabled only when Ring Indicator window is open).
Ring Indicator Window - Monitor your modem for incoming calls. When incoming call detect, Ring Indicator window become the Topmost window, Qaring.wav begin to play, the Lamp icon start to flash, and if Ringrun.bat found in Query Application folder, it execute. To Start Ring Indicator Window click the small button near the Speaker icon (see picture below).

Test/Stop button - The small button near the lamp icon. Lets you simulate incoming call, and reset upon real calls. Ring Indicator window will auto reset itself after one minute from the last ring, (or when you click the Test/Stop button, as mentioned).
Qaring.wav - The sound you hear when incoming call detect. You can change it, or delete it to hear No sound.

Modem commands explanations
Basics AT commands
 Hayes AT commands set
Serial Com Port FAQ
Contacts

© Leeos Software 2001


Modem Commands

Modem Commands - Explanations

The instructions from your computer to you modem which configure it, dial it and decide how it handles data transmission are referred to as the Hayes Command Set. As more players enter the modem market and modems become more sophisticated, the set has been extended and occassionaly a manufacturer will alter the command set on their modem. The Hayes Command Set can be divided into three groups:
Basic Command Set: A capital character followed by a digit. For example, M1.
Extended Command Set: An "&" (ampersand) and a capital character followed by a digit. This is an extension of the basic command set. For example, "&M1". Note that "M1" is different from "&M1".
Register Commands: Sr=n where "r" is the number of the register to be changed and "n" is the new value that is being assigned. A "register" is computerese for a specific physical location in memory. Modems have small amounts of memory onboard. This third set of commands is used to enter values in a particular register (memory location). The register will be storing a particular "variable" (alpha-numeric information) which is utilized by the modem and communication software. For example, S7=60 instructs your computer to " Set register #7 to the value 60."


Modem Commands - Basic Explanation

Basic Hayes Modem (AT) Commands

Every modem that is called "Hayes compatible" follows a certain set of codes which tell the modem what to do. In the case of some programs, you don' t have to know these commands to dial your modem, because the program does it for you. On the other hand, other programs require that you know these commands to dial your modem and perform other useful functions. Here is a list of commands you may find helpful:
AT
tells your modem that you are going to send it a command. You must type "AT" before you issue any other command. If you issue AT as a command all by itself, the modem should respond "OK". This indicates that your cables ar e connected correctly and the baud rate is set properly.
D
tells your modem to dial the numbers following the "D."
T
is a subcommand of the "D" command. It tells your modem that you want it to dial in touch-tone mode. Use this command only if you have a touch-tone phone line.
P
is a subcommand of the "D" command. This tells your modem that you want it to dial in pulse mode. Use this if you do not have a touch-tone phone line.

Helpful Hints

The order in which the commands are issued is important. "AT" must always be the first command you type. Once you give the "D" command, any character typed after it either is executed as a subcommand of the &quo t;D" command or is dialed. Therefore, if you typed the "M0" command after the "D" command, the modem would try to dial M0 instead of trying to shut off the sound.

Do not leave any spaces between any of the commands or the numbers that you are dialing.

If you are trying to use a modem you must turn off the "call-waiting" feature on your phone when you dial the modem. This can be done by putting *70,, before the number you are dialing. Disabling call-waiting is important because if somebody does call you in the middle of a session, the click made by the phone will disturb the transmission and cause garbage to appear on your screen or in your file.

Examples of Commands

(1) Straight dialing:
AT (Hit the return key) ...the modem responds "OK"
ATDT4576080 (Hit the return key) ...dialing from a touch-tone
ATDP4576080 (Hit return key) ....dialing from a non-touch-tone
2) Dialing, turning the sound off and disabling the call-waiting feature:
AT (Hit return key) ...the modem responds "OK"
ATM0 (hit return key)
ATDT*70,,4576080 (Hit the RETURN key)

http://www.fan.nb.ca


Modem Command Set

The Hayes Command Set

COMMAND | ACTION
ATA | Enters answer mode. After going off hook, the modem will answer the incoming call. It will then go on-line with the other modem.
ATA/ | Previous command line is repeated. Not to be preceded by AT nor followed by
ATB0 | Use CCITT V.22 at 1200 bps
ATB1 | Use 212A at 1200 bps. Not supported in the United Kingdom
ATB2 | When making a call using CCITT V.23, transmit at 75 bps and receive at 1200 bps. When answering and N0, transmit at 1200 bps and receive at 75 bps.
ATB3 | When making a call using V.23, transmit at 1200 bps and receive at 75 bps. When answering and N0 selected, transmit at 75 bps and receive at 1200 bps.
ATB15 | Use CCITT V.21 at 300 bps
ATB16 | Use 103 at 300 bps. Not supported in the United Kingdom.
ATB41 | Use CCITT V.32 at 4800 bps
ATB42 | Use Express 96 at 4800 bps
ATB60 | Use CCITT V.32 at 9600 bps
ATB61 | Use Hayes Express 96 proprietray protocol 9600 bps connection.
ATD | Originate mode. The modem goes off-hook and tries to go on-line with another modem. The dial modifiers (see next table) direct the modem what, when, and how to dial.
ATE0 | In command state, characters are not echoed from the keyboard to the screen.
ATE1 | In command state, characters are echoed from the keyboard to the screen
ATH0 | After hanging up, place modem in command state.
ATH1 | After going off hook, operate auxilary relay
ATI0 | Show numeric product code
ATI1 | ROM checksum is calculated
ATI2 | ROM checksum is verified (output is OK or ERROR)
ATL0, L1 | Speaker volume low
ATL2 | Speaker volume medium
ATL3 | Speaker volume high
ATM0 | Speaker off
ATM1 | Speaker on until carrier detected
ATM2 | Speaker on
ATM3 | Except when dialing, speaker on until carrier detected
ATN0 | Handshake only at rate specified by S37 while originating or answering
ATN1 | Negotiate common communication standard, while originating, at the optimum line speed supported by both modems. Negotiations start at the DCE line speed specified in S37, dropping back to a slower speed if required. Go back from CCITT V.22 to CCITT V.21, when answering.
ATN2 | Negotiate common communication standard, while originating, at the optimum line speed supported by both modems. Negotiations start at the DCE line speed specified in S37, dropping back to a slower speed if required. Go back from CCITT V.22 to CCITT V.23/CCITT V.21, when answering.
ATN3 | Handshake only at speed defined by S37, when originating. Go back from CCITT V.32 to CCITT V.22./212A/CCITT V.22bis, finally 103, when answering
ATN4 | Handshake only at speed defined by S37, when originating. Go back from CCITT V.32 to CCITT V.22./212A/CCITT V.22bis, finally 103, when answering
ATN5 | Negotiate common communication standard, while originating, at the optimum line speed supported by both modems. Negotiations start at the DCE line speed specified in S37, dropping back to a slower speed if required. Handshake only at speed defined by S37, when answering.
ATO0 | Enter on-line state
ATO1 | Enter on-line state. Then start equlaizer retrain sequence
ATO3 | Enter on-line state. Then start CCITT V.32bis rate renogotiation sequence
ATQ0 | Result codes are returned
ATQ1 | Result codes are not returned
ATQ2 | Result codes are retruned in originate mode. Result codes are not returned in answer mode
ATSr? | Read and respond with current value of register r. ? requests the value assigned to that register.
ATSr=n | Register r is set to n.
ATV0 | Result codes are shown as numbers
ATV1 | Result codes are shown as words
ATW0 | Negotiation progress messages are not returned
ATW1 | Negotiiation progress messages are returned
ATW2 | Negotiation progress messages are not returned. CONNECT messages are returned with modem-to-modem (DCE) speeds, not modem-to-DTE speeds.
ATX0 | Give basic call progress result codes: CONNECT , NO CARRIER ,and RING
ATX1 | Give basic call progress result codes and connection speeds (for example, CONNECT 2400)
ATX2 | Give basic call progress result codes, connection speed, and DIALTONE detection
ATX3 | Give basic call progress result codes, connection speed and BUSY signal detection
ATX4 | Give basic call progress result codes connection speed, BUSY signal detection and DIALTONE detection.
ATY0 | Ignore longspace disconnect
ATY1 | Obey longspace disconnect
ATZ0 | After reset, recall user profile 0
ATZ1 | After reset, recall user profile 1
AT&A0 | When auto-answering, connect as answering modem
AT&A1 | When auto-answering, connect as originating mode,
AT&C0 | Presence of carrier detect signal is assumed (ROM default. This value is recalled after &F is issued)
AT&C1 | Track status of carrier detect signal
AT&C2 | Presence of carrier detect signal is assumed until on-line. From that point, track status of signal
AT&D0 | Status of DTR signal is ignored. (ROM Default. This value is recalled after &F is issued)
AT&D1 | DTR signal is monitored. The modem enters command state after an on-to-off transition of DTR signal. If the connection is intact, the O0 command returns to the on-line state.
AT&D2 | DTR signal is monitored. The modem hangs up and enters command state after an on-to-off transition of DTR signal.
AT&D3 | DTR signal is monitored. The modem hangs up and resets after an on-to-off transition of DTR signal.
AT&F | Recall factory configuration
AT&G0 | Guard tones not used (Not supported in Netherlands, Norway, Sweden, Switzerland, or the United Kingdom)
AT&G2 | 1800 Hz Guard tones are used
AT&J0 | Configure for RJ-11, RJ-41S, RJ-45S telco jacks
AT&J1 | Configure for RJ-12, RJ-13 telco jacks (Not supported in Netherlands, Norway, Sweden, Switzerland, or the United Kingdom)
AT&K0 | Local flow control disabled
AT&K1 | RTS/CTS local flow control enabled
AT&K2 | XON/XOFF local flow control enabled
AT&K3 | RTS/CTS local flow control enabled
AT&K4 | XON/XOFF local flow control enabled
AT&K5 | Transparent XON/XOFF local flow control enabled
AT&L0 | Set for dial-up mode
AT&L1 | Set modem for conditioned leased line (private speechband circuit) mode
AT&On | Go to the X.25 PAD command state of channel n(n=0-3) from the AT command state. The modem will return to the command state of last channel selected, if a parameter for this command is not specified.
AT&Q0 | Communicate in asynchronous mode
AT&Q1 | Communicate is asynchronous mode 1 - Async-to-Sync
AT&Q2 | Communicate in asynchronous mode 2 - Stored Number Dial
AT&Q3 | Communicate in asynchronous mode 3 - Voice/Data Switch
AT&Q4 | Communicate in asynchronous mode 4 - Hayes AutoSync.
AT&Q5 | Communicate in error-control mode
AT&Q6 | For interfaces requiring constant speed between the DTE (computer/terminal) and the DCE (modem), communicate in asynchronous mode with automatic speed buffering (ASB)
AT&R0 | Track CTS according to RTS
AT&R1 | Assume CTS (ignore RTS)
AT&S0 | Assert DSR signal always
AT&S1 | Assert DSR signal before handshake only
AT&S2 | After handshake negotiation, assert DSR signal, but before CONNECT XXXXX result code is sent to the DTE
AT&T0 | Halt any test in progress
AT&T1 | Start local analog loopback
AT&T3 | Start local digital loopback
AT&T4 | Grant request from remote modem for remote digital loopback
AT&T5 | Deny request from remote modem for remote digital loopback
AT&T6 | Start remote digital loopback
AT&T7 | Start remote digital loopback with self-test
AT&T8 | Start local analog loopback with self-test
AT&T19 | Find out if RTS and CTS circuits are supported in the DTE cable
AT&U0 | Trellis coding enabled (CCITT V.32 9600 bps only)
AT&U1 | Trellis coding disabled
AT&V | View active, user profiles, and stored telephone numbers
AT&W0 | Write current configuration parameters in memory as profile 0
AT&W1 | Write current configuration parameters in memory as profile 1
AT&X0 | Derive transmit clock signal from modem's internal oscillator (internal clock signal on pin 15)
AT&X1 | Derive transmit clock signal from attached computer (external clock signal on pin 24)
AT&X2 | Derive transmit clock signal from receive carrier (slave receive clock signal on pin 15)
AT&Y0 | Set stored user profile 0 as power-up configuration
AT&Y1 | Set stored user profile 1 as power-up configuration
AT&Zn=x | Store phone number x in location n (n=0-3)

*Comment: Check your modem documentation for full list of commands.

http://www.computercraft.com


The Serial (Com) Port FAQ

http://www.comminfo.com

Table of Contents

What is a Serial Port?

Is a Game Port a Com Port?

What Addresses Do Serial Ports Use?

How do Serial Ports Use Interrupts (IRQs)?

Why does my Modem change Ports?

What Kinds of Serial Ports are There?

  • Unbuffered UARTs
    • The 8250 and 8250B - the original PC UART!
    • The 8250A - for the faster XT class machines
    • The 16450 - for the IBM AT class computers
    • The 16550 - mostly in early PS/2 models
  • Buffered UARTs
    • The 16550A - the standard UART
    • The StarTech 16650 - a new UART
    • The TI 16750 - a newer UART
  • Smart Serial Ports
    • Hayes ESP-I and ESP-II
    • Practical Peripherals HSSP
    • The T/Port
  • Other Types of Serial Ports

What UART do you Need?

Can I Use IRQ 2 or IRQ 9?

Can You Avoid Overrun Errors?

  • What is an Overrun Error?
  • Why do Overrun Errors Occur?
  • How do I Reduce Overrun Errors?
  • Why doesn't an error-control modem prevent overrun errors?
  • Can flow control stop overrun errors?

Why Does My Mouse Misbehave In Windows?

Com4 and Video Card Conflicts

What Now? You didn't answer MY Question!

What is a Serial Port?

First, let's get the terms defined: the name "serial port" is the same thing as a "COM port", a "comm port", a "communications port" and an "asynchronous communications adapter." These are all different names for the same thing. And, to help confuse it a little more, an internal modem has a serial port built into the modem.

A serial port provides a path for information to pass in and out of your computer. Information sent from your computer is sent to the serial port by "communication software" or a serial port driver. This software sends the information to the serial port by writing a character (for example, the letter "A") to the appropriate serial port address. The serial port receives this character, converts it into a signal which can be sent through a serial cable, and sends it to your modem (or whatever type of device you happen to have connected to the serial port). Information sent to your computer is received by the serial port from the cable, and prepared for your computer. When the serial port has prepared a character for the computer, the serial port sends a signal to the computer through an interrupt request line telling the computer that a character is ready. When the computer sees the interrupt request, the communication software (or driver) "services" the serial port and reads the character.

There were three key points mentioned about serial ports in the preceding paragraph:

  1. Serial ports use addresses
  2. Serial ports use a signal line (an IRQ) to get the attention of the computer
  3. The software controlling the serial port has to know which address and IRQ to use.

Return to Table of Contents

Is a Game Port a Com Port?

NO! A game port is, well, a game port! Game ports do not count as Com ports. Game Ports use different addresses, support different devices and typically do not use an IRQ.

Return to Table of Contents

What Addresses Do Serial Ports Use?

Most serial ports use standard preassigned addresses. The addresses are almost always described in hexadecimal (base 16.) When you install a new serial port, you usually move a jumper or switch to select the serial port number (COM1, COM2, etc.) This selection is usually assigning the both the address and the interrupt (IRQ) used by the serial port board.

The port addresses and IRQs used for serial ports is different for ISA bus (the common computer available today) computers and IBM PS/2 computers. The "ISA" standards for COM1 and COM2 were set by IBM when they originally designed the personal computer. The addresses and IRQs for COM3 and COM4 are widely accepted conventions, but not officially defined:

 Serial Port   Address     Interrupt (IRQ)
    COM1         3F8              4
    COM2         2F8              3
    COM3         3E8              4
    COM4         2E8              3

Newer boards may allow you to select an address rather than serial port number, or define preset addresses that are not standard. These boards offer greater flexibility in adding serial ports to your system, but require additional care during installation. You can have a serial port at any address between 100 and 3FF (hexadecimal) that doesn't conflict with other devices. There are two potential trouble areas: 1) you must make sure that you do not put the serial port in an address space used by another device, and 2) every software that needs to use the serial port application (or your operating systems serial port driver) must be configured for the non-standard address.

The IBM PS/2 computers using the Microchannel Architecture have a standard definition for both the port addresses and IRQs for all serial ports from COM1-COM8:

 Serial Port   Address   Interrupt (IRQ)
    COM1         3F8          4
    COM2         2F8          3
    COM3        3220          3
    COM4        3228          3
    COM5        4220          3
    COM6        4228          3
    COM7        5220          3
    COM8        5228          3

One of the advantages of the Microchannel bus is the ability to share IRQs. All of the hardware designed for the PS/2 computers are required to support IRQ sharing, so Com2-Com8 all can use the same IRQ! You need to use your IBM system reference disk when installing a new serial port or internal modem. The system configuration option will assist you in finding serial port conflicts.

Return to Table of Contents

How do Serial Ports Use Interrupts (IRQs)?

"Interrupt", "Interrupt ReQuest", and "IRQ" are different names for the same thing. IRQs are used by different devices in the computer to signal that the device needs the attention of the computer. The computer "interrupts" whatever it is doing, responds to the interrupt request, and then resumes doing what it was doing before.

IRQs have numbers associated with them. The IRQ numbers are normally described in decimal rather than hexadecimal (just to help confuse the issue, of course!). On an IBM PC/XT, there are eight interrupts (0 through 7) available for use. Some are pre-defined for other devices and not available for communications:

IBM PC/XT IRQs
 IRQ # (decimal)      Description
    0 *               System Timers (the clock)
    1 *               The keyboard (you create an interrupt each time
                      you press a key!)
    2                 Available
    3                 Com2
    4                 Com1
    5                 Hard Disk
    6                 Floppy Disk
    7                 Printer

Note: a "*" indicates the IRQ is NOT available on the system bus for use by an add-in board.

On a computer with an IBM AT or compatible bus, there are 16 IRQs defined. Again, some are pre-defined for other devices and not available for communications:

IBM AT and Compatible IRQs

 IRQ # (decimal)      Description
    0 *               System Timers (the clock)
    1 *               The keyboard (you create an interrupt each time
                      you press a key!)
    2 *               The "cascade" IRQ (see Using IRQ 2 and IRQ 9)
    3                 Com2
    4                 Com1
    5                 Available
    6                 Floppy Disk
    7                 Printer (LPT1)
    8 *               Real Time Clock
    9                 Available (see Using IRQ 2 and IRQ 9)
    10                Available
    11                Available
    12                PS/2 Mouse or Available if other mouse is used
    13 *              Math Coprocessor
    14                Hard Disk Drive
    15                Available

Note: a "*" indicates the IRQ is NOT available on the system bus for use by an add-in board.

Only two of the IRQs are defined for use with serial ports: IRQ 3 is used for COM2, and IRQ 4 is used for COM1. These are the "official standard" assignments for COM1 and COM2. Many people have more than two serial ports on their computers today, so there are two options: 1) they can try to share interrupts between the different serial ports, or 2) they can use other "available" interrupts for the additional ports. The convention in the past was for COM3 and COM4 to share IRQs with COM1 and COM2. Unfortunately, this normally does not work well with the multitasking operating systems used today (Windows, Win95, WinNT, OS/2 and UNIX). The only time IRQ sharing will work is if you use a serial port card that shares one IRQ among several serial ports on the same card.

Another thing to notice is that there are very few available interrupts if you have a board compatible with an IBM PC/XT. Since interrupts are used by most add-in boards, there can be conflicts between the different devices. If you have a "16 bit" board, that is, a board that will fit in an AT style bus but not a PC/XT bus, then there are several more interrupts (10, 11, 12, and 15) available for use. If you have an 8-bit board, the only available choices on an AT bus computer are interrupts 5 and 9. Unfortunately, nearly all internal modems are designed with this limitation.

NOTE: an 8-bit board that is set to use IRQ 2 actually uses IRQ 9 when installed in an AT bus computer. See the Using IRQ 2 and IRQ 9 for more information.

Return to Table of Contents

Why does my Modem change Ports?

Some applications (including Windows) use a list of serial ports that is created by the BIOS when your computer powers up. Some applications also use this list when selecting a serial port to use. Others don't - they look for a serial port at a particular hardware address and ignore the way the BIOS detected the ports.

Why is this a problem? It is possible to have two different modem applications where one of the applications uses the modem on "Com1" and the other uses the same modem on "Com2". So....which Com (serial) port is really being used?

Another problem is that the BIOS on many computer system will only detect Com1 and Com2. If you have installed a Com3 port, then software that depends on the BIOS to detect the port will fail.

The best way to avoid these types of problems is to make sure that your serial ports are installed in sequential order, and that all of your ports (up to Com4) are detected. That is, make your first port Com1, your second port Com2, and so on. By doing this, then the BIOS will detect your serial ports at the same location as software that works with a particular serial port address. If all of your ports are detected, and in ascending sequential order, then all is well. If not, then you should try to make the following changes:

1. Install your serial ports in ascending sequence without skipping a port number. For example, if you have COM1 and COM2 in your system, install the next serial port as COM3.

2. You can update the BIOS data area with our BIOS_FIX utility. Putting BIOS_Fix in your AUTOEXEC.BAT file will ensure that your ports are always detected properly.

Return to Table of Contents

What Kinds of Serial Ports are There?

There are many different types of serial ports. The serial port type is normally defined by the type of UART (an acronym for Universal Asynchronous Receiver / Transmitter) used in the serial port. The UART is a special purpose chip in the serial port that converts the parallel data format used by the computer into a serial data format that is sent by the serial port::

The letter "T"                      The letter "T"
in Parallel Format                  in Serial Format

     "T"
Bit 0 0 ------------> +------+
Bit 1 0 ------------> |      |
Bit 2 0 ------------> |      |
Bit 3 1 ------------> | UART |-----> 01011000 "T"
Bit 4 1 ------------> |      |
Bit 5 0 ------------> |      |
Bit 6 1 ------------> |      |
Bit 7 0 ------------> +------+

Unbuffered UARTs

Unbuffered UARTs were designed in the days when a fast modem was 1200 BPS! These UARTs have no extra character buffering in the UART, so they depend on the computer to remove each character sent by the modem before the next character is received. The unbuffered UARTs include the 8250 series, the 16450 and the original 16550 (without the "A")

The 8250 and 8250B

The 8250 was the original UART used in the IBM PC/XT, and the 8250B is a slightly slower version of this part (but fast enough for the PC/XT class of machines.) This UART should not be used in an IBM AT or faster computer. There is a risk of occasional error or complete failure when using this UART in any machine other than an PC/XT class machine. Many diagnostic programs erroneously report the 8250A UART as an 8250. They are different, and should be reported as such. The 8250 and 8250B are reported as "8250" UARTs, while the 8250A is reported as an "8250A".

NOTE: There are a few internal modems that use a custom chip implementation of the 8250 which are fast enough to use in an AT class of computer. Remove the modem from your computer and examine the chips on the board. You may have problems with this modem if there is a large rectangular chip of 40 pins with "8250" or "8250B" in the chip number. If you don't see a chip with this number, then you are probably OK.

The 8250A

The 8250A UART is an improved version of the 8250 / 8250B UART that operates a little faster (on the computer bus, not with the modem) and with fewer problems. The 8250A is fast enough to be used on a computer based on the 8086 CPU (some of the dual-speed PC/XT class machines designed in 1983-1985), but still is not fast enough to use in an AT class or faster computer.

Since the 8250A looks just like a 16450 to the controlling software, there is no way for software to determine if your UART is fast enough for your machine. When you have the opportunity to examine your serial port board in the computer, or if you have problems with a port in an AT class of machine, then you should manually inspect the serial port for a 40-pin chip that has "8250A" as part of the part number. If you find one in your machine, remove it if you have any problems.

Note: the 8250A has not been designed into any new equipment in several years, so you would only have a problem with this if you transferred a serial port or internal modem from an older computer to a newer system.

The 16450

The 16450 is a faster version (again, on the computer bus) of the 8250A that is designed for use in AT class machines. A 16450 is fast enough to support low speed communications on all popular computers today. As noted above, there is no way for software to tell the difference between a 16450 and the 8250A, so your different diagnostic programs may give you different results. MSD reports this UART as an 8250.

The 16550

The 16550 is a UART that was only shipped for a short period of time. This UART has 16 byte internal buffers that do not work. Many of the early IBM PS/2 computers included this chip, as did a few add-in cards for other computers. As long as the UART is used as if it were a 16450, everything will work normally. Software that is properly designed to operate with a 16550A UART will detect that a 16550 UART is installed and will not try to use the internal buffers.

Buffered UARTs

Buffered UARTs have been designed to help support faster modems. The original buffered UART was the 16550A - it allows up to 16 characters to accumulate in the UART buffer before the processor has to read the data. This makes it much easier for the PC software to keep up with the data from the modem - resulting in higher data throughputs and fewer character overrun errors.

In addition to making it easier for the software to keep include additional features

The 16550A

This is an improved version of the 16550 (the buffers work in this version!) This is the standard UART of the 1990s, as it is required for the high speed communications available with the newer modems now available. In addition to providing better performance in Windows and OS/2, the buffers help prevent overrun and CRC errors in some DOS applications and on slower computer. In general, if you are purchasing a serial port or a new computer, demand a 16550A or compatible UART. It will help you avoid problems with overruns and slow throughput in the future.

There are a lot of different versions and varieties of the 16550A - different manufacturers have different varieties of this part, and many of them put two or more UARTs into a single chip. Others make "super-I/O" chips that include two serial and one parallel port plus the hard and floppy disk controllers. While a few early clones of the 16550A had some problems, in general the different versions have been very good for the past few years.

Of course, there is ONE exception. There is a super-IO chip manufactured by Standard Microsystems Corporation (SMC) that has a rather serious lockup problem. This chip cannot be detected by diagnostic software, but in some situations will lock up the computer on the second use of an external modem. The part is labeled with the letters SMC and has a long part number ending in "665". If you have this part, you can often work around the problem with replacement serial port drivers for Windows. A replacement part labeled with a number "FDC37C666GT" is supposed to fix these problems, but there are occasional reports that a problem may still exist.

The StarTech 16650 UART

This chip is a enhanced version of the 16550A UART. This UART provides a 32 byte FIFO, automatic flow control and a higher throughput potential. Unfortunately, however, the designers did not make this chip fully compatible with the 16550A. This means that this part may not work with some software and drivers. In particular, many DOS applications will not work properly with this chip unless run in a "DOS box" of another operating system. Therefore, unless you are able to get a driver for the operating system(s) that you use, use of this UART could be problematic.

Texas Instruments 16750 UART

TI did it right! This looks like a very nice UART that is fully compatible with the 16550A. The 16750 provides a 64 byte buffer and an automatic flow control capability. TI successfully hid these features from existing software which means that compatibility with the 16550A was preserved. To take advantage of the new features (bigger buffer and flow control), you will need a driver or software that supports this specific UART.

Smart Serial Ports

There are a few cards designed specifically to provide an intelligent high-speed serial port for normal PC communications. These cards have a microprocessor built into the card to assist the PC with high-speed communications. In addition, the cards typically have a "high speed data transfer" mode that is much more efficient at moving the data to and from the PC than the normal serial port interface. These cards require special drivers to use the advanced features, but also provide a standard serial port interface for compatibility when drivers are not available.

Hayes ESP-I and ESP-II

Hayes has introduced three different types of "Enhanced Serial Ports", or ESP cards. The original ESP card (ESP-I) is a full-length 8-bit card with two 16550A serial ports and a processor that allows for DMA transfers between the serial ports and system memory.

To take full advantage of this card, a driver is required. Hayes no longer supports the original ESP card for Windows or OS/2 use, however, so it is essentially a standard 16550A serial port.

The ESP-II comes in both one-port and two-port models. This is the replacement product from Hayes for the original ESP, and Hayes is providing drivers for different environments at this time. Be sure to check if a driver is available for your system when you need it. As of this writing, Hayes has recently introduced a driver for Windows95; note, however that Hayes has discontinued the two-port version of the ESP-II.

Practical Peripherals HSSP

The Practical Peripherals High Speed Serial Port (HSSP) is (at this time, at least) a repackaged version of the Hayes ESP-II card - identical in every way, down to the "Hayes" markings on the chips.

Drivers: same as ESP-II.

The T/Port

The T/Port from Telcor Systems, Inc. is a special purpose serial card that includes a microprocessor on the serial card to handle much of the time-sensitive work normal performed by the host computer. By "off-loading" the processing normally involved with receiving each character from the host computer, the T/Port (and the similar Hayes ESP card) improves the overall performance of the computer, particularly when operating in Windows or OS/2. The T/Port presents an "emulated 16450 compatible" interface to the computer.

Drivers are available for Windows 3.1 and Windows 3.11.

Other Types of Serial ports

A number of internal modems use chip sets that appear to be 16450 UARTs, but in fact are microprocessors masquerading as a UART. Some internal modems also have a large secondary buffer in the modem that provides additional buffering. These large buffers cannot be detected by normal software, but do offer considerable protection against character loss (overrun errors).

Return to Table of Contents

What UART do you Need?

A good question - and there's no single answer! If you use internal modems, you don't have much of a choice, since the UART is on the modem card. When you purchase a new internal modem, be sure that it has a 16550A UART (or a functional equivalent) to deal with high-speed communications.

If you use external modems, then the choice becomes less clear. Many users are very happy with 16550A UARTs - and this is the minimum that I would recommend for any user today. However, even with these UARTs, you may find that you have "overrun errors" that slow things down. Sometimes you can adjust your communications driver to reduce or eliminate the problem, but other users find that more buffering is required.

If you decide that you need a UART with additional buffering or a Smart Serial Port, your selection will be driven primarily by the environment (DOS, Windows, Windows 95, Windows NT, OS/2 or UNIX) that you use. Why? Because to use the advanced features of these UARTs, you need a driver that supports the advanced features - otherwise, you'll gain no benefit from the card. Read the box CAREFULLY or ask the manufacturer directly to see if the driver you need is available.

Return to Table of Contents

Can I Use IRQ 2 or IRQ 9?

Use of IRQ 2 or IRQ 9 on an AT or compatible computer has been an issue of considerable confusion. And no wonder! IBM redefined how IRQ 2 was used when it introduced the IBM-AT, and the world has been confused since.

Yes, IRQ 9 can normally be used. If you have a board that you can set to IRQ 2, it actually uses IRQ 9! Your software can use this board as if it were on either IRQ 9 or IRQ 2, so just select whichever IRQ your software supports.

Return to Table of Contents

Can You Avoid Overrun Errors?

Many modem users experience "overrun errors" when they replace their old modem with a faster model. This note outlines the causes of overrun errors and offers tips to help you eliminate the problem.

What is an Overrun Error?

An overrun error is a character that is lost between your modem and the PC. Your communication software controls how you are affected by the overrun error. Some software will identify and report an overrun error. Other software may simply report file transfer protocol retries without specifying the type of error. Some other software doesn't tell you anything, but does a retry anyway. You just notice a connection that is slower than it should be.

Why Do Overrun Errors Occur?

Overrun errors are a result of a mismatch between the speed a modem sends characters to the PC and the ability of the PC to process the data. The serial port data rate controls the speed of the connection with the modem. A slow 2400 BPS modem without data compression will put only 240 characters per second (CPS) into the serial port. This gives the computer over 4 milliseconds (a real long time in computer terms) to respond to each character. A fast 28800 BPS modem using data compression will put up to 5,760 (or more) characters per second into the serial port. This is over 20 times faster than the slow modem, and requires the computer to read the data in less than 2/10ths of a millisecond. The faster modem is much more likely to create an overrun error than a slow modem.

How Do I Reduce Overrun Errors?

There are three things that you can try:

1. If you are using an older, unbuffered serial port (a 16450), you should install a buffered serial port.. This is an easy operation for a few users. Many older serial ports can be upgraded by replacing the serial port chip with the improved 16550A. The 16550A chip is an exact replacement for the older ports, and may be placed in the same socket. Plan on buying a new card that has the 16550A serial port if your serial ports are not in sockets or if they are built into the motherboard. Internal modems (modem boards) usually cannot be upgraded to use a 16550A.

The buffered serial port helps by holding a number of characters until the PC can read them. A 16550A will hold up to 16 characters, and the other buffered ports hold more. This reduces the demand on the computer to keep up with the data flow, and thereby reduces the risk of an overrun.

2. If you already have a buffered UART, check your port settings to make certain the FIFO is enabled and that the receive trigger level is not set too high. In Windows, these settings are controlled by variables in the SYSTEM.INI file. Try using the following values, where the "?" is replaced by the Com port number you are having problems with:

  • Com?FIFO=1
  • Com?Buffer=1024
  • Com?RxTrigger=8 (if it already is set to 8, try using either 4 or 1)

The first line enables the FIFO in the UART; the second sets up a 1024 byte buffer for use by the serial port driver, and the third controls the UART trigger level. To reduce overruns, lower the trigger level. Valid values are 14, 8, 4 and 1.

NOTE: Do not enable the FIFO on a serial port used by a mouse! See Why Does My Mouse Misbehave In Windows? for more information.

3. If you cannot fix the problem any other way, then slow down the speed that you talk to your modem. Modem manufacturers typically recommend setting the serial port speed four times faster than the modem can send data. This is based on the modem compressing data by a four to one ratio. However, a two to one compression ratio is more realistic for text, and if you are mostly downloading precompressed files, you don't get any additional compression by the modem.

By slowing down the serial port, you increase the amount of time the PC has to respond to characters. This will reduce and possibly eliminate your overrun errors. If the overrun errors caused retries during file transfers, setting the serial port to a slower speed may actually make the transfers run faster!

Why doesn't an error-control modem prevent overrun errors?

An error-control modem which uses V.42 or MNP is designed to detect and correct errors that occur on the telephone line between the modems. Error-control modems provide no protection for data sent to or from the PC. It is incorrectly assumed that this data path is safe You should always use an error-detecting file transfer protocol even when using error-control modems so your software can detect and ask the remote computer to retransmit the data to correct the overrun error.

Can flow control stop overrun errors?

Both software and hardware flow control are used by the computer as a signal to the modem that the memory in the computer used to hold received characters is getting full. This is a very important feature that should be used at all times to prevent the data storage buffers in the PC or the modem from overflowing. In some cases, improper flow control settings by the modem or the PC software can cause an overrun error.

Return to Table of Contents

Why Does My Mouse Misbehave In Windows?

If you have a serial mouse that occasionally locks up or becomes very sluggish, check and see if the mouse is connected to a buffered (16550A) serial port. If so, add the following command to your Windows SYSTEM.INI file where "?" is replaced by the Com port number you are having problems with:

  • Com?FIFO=0

This will disable use of the FIFO and may fix the problem.

Return to Table of Contents

Com4 and Video Card Conflicts

Com4 cannot be used in many computers due to an address conflict with the video card. This conflict can cause a variety of problems depending on the exact video card and operating system ranging from a very slow modem connection to a system lockup. Cards using the "S3 chipset" are the most common video cards that conflict with Com4.

Return to Table of Contents

(c) Copyright 1996-97, Computer Telecommunication Systems, Inc. ALL RIGHTS RESERVED.


Contacts

Contact Information

Lior Ostrowsky lior@leeos.com

lior o@yahoo.com

lioro@hotmail.com

http://www.leeos.com